<template>
  <div class="notice">
    <u-notice-bar mode="horizontal" type="error" :close-icon="true" :list="noticeList" @close="close" @click="toDestail"></u-notice-bar>
  </div>
</template>

<script>
import { mapState } from "vuex";

export default {
  data() {
    return {

    }
  },
  computed: {
    ...mapState(["noticeList","noticeJson"]),
  },
  methods: {
    close() {
      this.$store.state.noticeList = [];
			clearInterval(this.$timer);
    },
		toDestail() {
			this.$u.route("/pages/details/details",{
				id: this.noticeJson.sid,
				l_id: this.noticeJson.l_id
			});
		},
  }
}
</script>

<style lang="scss" scoped>
.notice{
  position: fixed;
  z-index: 990;
  top: var(--status-bar-height);
  left: 0;
  width: 100%;
  opacity: 0.97;
}
</style>